#pragma once

#include <stdlib.h>
#include <stdbool.h>

typedef int E;

typedef struct
{
	E* elements;
	size_t size;
	size_t capacity;
	size_t front;
	size_t rear;
} Queue;

// API
void queue_init(Queue* q);
void queue_destroy(Queue* q);

void queue_push(Queue* q, E e);
E queue_pop(Queue* q);
E queue_peek(Queue* q);
bool queue_empty(const Queue* q);
void queue_display(const Queue* q);